/**
 * 图片
 */
import React from 'react'
import { IGood } from '@/model/declare';
import { View } from '@tarojs/components';


import './index.scss'
import { ImageEle } from '@/components/Image';
// import goods from '@/pages/home/goods';

export interface IPreviewProps {
    goods: IGood[]
}

export const PreviewEle: React.FC<IPreviewProps> = ({
    goods
})=>{
    return (
        <View className="xxm-preview-ls">
          {
              goods.map((good,idx)=>{
                  return (
                     <View className="xxm-preview-ls__item" key={idx}>
                        <ImageEle
                          src={good.main_pic}
                        />
                        <View className="xxm-preview-ls__tip">
                            {good.nick}
                        </View>
                     </View>
                  )
              })
          }
        </View>
    )
}
